﻿using Framework.Core.Helper;
using Microsoft.Extensions.Logging;
using my.abp.Domain.Shared.Etos;
using Quartz.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Auditing;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;

namespace my.abp.Domain.EventHandlers
{
	/// <summary>
	/// 审计日志事件
	/// </summary>
	public class AuditInfoEventHandler : ILocalEventHandler<AuditLogInfo>,
		 ITransientDependency
	{
		private readonly ILogger<AuditInfoEventHandler> _logger;

		public AuditInfoEventHandler(ILogger<AuditInfoEventHandler> logger) { _logger = logger; }
		public async Task HandleEventAsync(AuditLogInfo auditInfo)
		{
			_logger.LogDebug("请求追踪:" + JsonHelper.ObjToStr(auditInfo, "yyyy-MM-dd HH:mm:ss"));
		}
	}
}
